using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Table
{
    /// <summary>
    /// <para>Get Count</para>
    /// <para>Returns the total number of rows for a table.</para>
    /// <para>返回表的总行数。</para>
    /// </summary>    
    [DisplayName("Get Count")]
    public class GetCount : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GetCount()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_rows">
        /// <para>Input Rows</para>
        /// <para>The input table view or raster layer. If a selection is defined on the input, the count of the selected rows is returned.</para>
        /// <para>输入表视图或栅格图层。如果在输入上定义了选择，则返回所选行的计数。</para>
        /// </param>
        public GetCount(object _in_rows)
        {
            this._in_rows = _in_rows;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Get Count";

        public override string CallName => "management.GetCount";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_rows, _row_count];

        /// <summary>
        /// <para>Input Rows</para>
        /// <para>The input table view or raster layer. If a selection is defined on the input, the count of the selected rows is returned.</para>
        /// <para>输入表视图或栅格图层。如果在输入上定义了选择，则返回所选行的计数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Rows")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_rows { get; set; }


        /// <summary>
        /// <para>Row Count</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Row Count")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long _row_count { get; set; }


        public GetCount SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}